<template>
    <div>
        <a-modal
            :title="formState.modalTitle"
            :visible="visible"
            @ok="handleOk"
            @cancel="visible = false"
            :width="815" 
            class="supplementary-history-model"
        >
            <commpVxeTable
                :key="supplementaryHistoryKey"
                :config="supplementaryHistoryConfig" 
                :columns="formState.modalTitle == '补齐补正历史'?supplementaryColumnsVxe:rectificationColumnsVxe" 
                :formItem="supplementaryHistoryFormItem"
                ref="acceptanceRegistrationRef"
            >
            </commpVxeTable>
            <template slot="footer">
                <div>
                    <a-button @click="visible = false" type="primary">关闭</a-button>
                </div>
            </template>
        </a-modal>
    </div>
</template>
<script>
import assessCheckApi from './service/api'
import commpVxeTable from '@/components/commp-vxe-table/commp-vxe-table.vue'
export default {
    components:{
        commpVxeTable,
    },
    props:{

    },
    data(){
        return{
            visible:false,
            formState:{},
            supplementaryHistoryKey:null,
            supplementaryHistoryConfig:{
                api:assessCheckApi.querySqsxBczgjlHistoryList,
                rowId: 'id',
                height:360,
                paramet:{
                }
            },
            supplementaryColumnsVxe:[{
                title: '发起人', //列头显示文字
                field: 'ffqr',
            },{
                title: '补正说明', //列头显示文字
                field: 'fbqbzyj',
            },{
                title: '退回时间',
                field: 'ffqrq',
            },{
                title: '企业提交时间',
                field: 'fwcrq',
            },{
                title: '是否已补正',
                field: 'fwczt',
            }],
            rectificationColumnsVxe:[{
                title: '发起人', //列头显示文字
                field: 'ffqr',
            },{
                title: '整改说明', //列头显示文字
                field: 'fzgyj',
            },{
                title: '退回时间',
                field: 'ffqrq',
            },{
                title: '企业提交时间',
                field: 'fwcrq',
            },{
                title: '是否已整改',
                field: 'fwczt',
            }],
            supplementaryHistoryFormItem:[]
        }
    },
    watch:{

    },
    mounted(){
        
    },
    methods:{
        getData(val){
              this.formState = val  
              this.supplementaryHistoryConfig.api = assessCheckApi[val.interfaceValue]
              this.supplementaryHistoryConfig.paramet = {sqsxid:val.sqsxid}
              this.supplementaryHistoryKey = Date.now()
        },
        handleOk(){
            
        },
    }
}
</script>
<style lang="less">
.supplementary-history-model{

}
</style>